This invention relates to capacitive sensing for sensing the presence or touch of an object adjacent to a sensor. In particular, the invention relates to multi-channel capacitive sensing.
Capacitive sensors have recently become increasingly common and accepted in human interfaces and for machine control, e.g. for providing touch sensitive buttons for activating functions of a device being controlled. Capacitive position sensors also find use in non-interface applications, e.g. in fluid level sensing applications.
FIG. 1 schematically shows a known type of capacitive sensor 2 which may be operated in accordance with the charge transfer techniques described in U.S. Pat. No. 5,730,165 and/or U.S. Pat. No. 6,466,036. The sensor is for measuring the capacitance Cx of a sense electrode 4 to a system reference potential (ground). The capacitance provided by the sense electrode to the system ground potential may thus be considered as being equivalent to a capacitor having capacitance Cx with one terminal connected to ground, and may be referred to as a sense capacitor.
The specific application for the sensor 2 is not significant for the purposes of this description. However, in this example it is assumed the sensor 2 is used to detect the presence of a pointing finger 8 adjacent the sense electrode 4. When there is no finger adjacent the sense electrode 4 its capacitance to ground is relatively small. When there is a finger adjacent the sense electrode 4 (as in FIG. 1), the sense electrode's capacitance to ground is increased as the pointing object provides a capacitive coupling Cx to a virtual ground. Thus changes in the measured capacitance of the sense electrode are indicative of changes in the presence of an adjacent object (e.g. a finger in a touch sensitive control, or a fluid in a level sensor). The sensor of FIG. 1 is a single-channel sensor in that it is operable to measure the capacitance of a single sense electrode 4.
In addition to the sense electrode 4, the sensor 2 comprises a microcontroller 6 and a sample capacitor Cs. The microcontroller 6 is a general purpose programmable device configured to provide the below-described functionality.
The provision of the sensing channel requires the use of two pins of the microcontroller 6, and these are labelled P1 and P2 in FIG. 1. The pins P1 and P2 of the microcontroller 6 may be driven high or low in a defined sequence as the controller executes its program in the usual way. This is schematically represented in FIG. 1 by a series of switches S1, S2, S3 and S4 within the microcontroller 6. Switch S1 selectively connects pin P1 to the microcontroller's operating logic level +V—this corresponds to the action of driving pin P1 high. Switch S2 selectively connects pin P1 to the microcontroller's system reference potential (ground)—this corresponds to the action of driving pin P1 low. Only one or other (or neither) of S1 and S2 can be closed at any one instant. Switches S3 and S4 similarly selectively drive pin P2 high or low as required.
In addition to being operable to be drive pin P1 high or low in accordance with its program instructions, the microcontroller is also operable to provide a measurement channel M connected to pin P1 (i.e. pin P1 is an I/O pin). The measurement channel comprises a simple comparator arranged to compare an input voltage on pin P1 with a threshold level Mthresh. Typically the threshold level might be half the microcontroller's operating voltage (i.e. Mthresh=+V/2).
The sample capacitor Cs is connected between pins P1 and P2. The sense electrode 4 is connected to pin P2.
FIG. 2 shows a table which schematically represents a switch operating sequence for the sensor of FIG. 1 for measuring the capacitance of the sense electrode 4 to system ground. The sequence operates in a series of steps starting at step 1, as indicated in the left-hand column. The columns headed S1 to S4 indicate the status of the respective switches in each step. An “X” in the table indicates the corresponding switch is closed, while an “O” indicates the corresponding switch is open. The columns headed P1 and P2 indicate the voltage level of the corresponding pins at each step. A table entry “LOW” indicates the corresponding pin is driven low, a table entry “HIGH” indicates the corresponding pin is driven high, where the pin is not driven high or low, its “free” voltage level is indicated. The final column provides brief comments on the step.
Step 1 is an initialisation/reset step. Switches S2 and S4 are closed so that pins P1 and P2 are both driven low. This in effect grounds the sense electrode 4 and shorts out the sample capacitor Cs so that there is no charge residing on either.
Step 2 is a charging step in which only switch S1 is closed. Thus pin P1 is driven high while pin P2 is free to float. The voltage +V provided on pin P1 thus charges the in-series combination of the sample capacitor Cs and the sense capacitor Cx.
The sample capacitor Cs and the sense capacitor Cx provide a capacitive divider between +V and ground. The voltage on pin P2 at the capacitors' common connection is the voltage across Cx (i.e. V(Cx)). This depends on the relative capacitances Cs and Cx. I.e. V(Cx)=V*Cs/(Cs+Cx) in accordance with the well-known capacitor divider relationship. The voltage across the sample capacitor Cs is V(Cs) where V(Cs)=V−V(Cx). I.e. V(Cs)=V* (Cx/(Cs+Cx)).
Step 3 is a measuring step in which only switch S4 is closed. Thus pin P1 is free to float and pin P2 is driven low. Driving pin P2 low means (i) the charge on Cx is removed (sunk to ground), and (ii) pin P1 achieves the voltage V(Cs) established across the sample capacitor Cs during the charging step 2. Thus the voltage on pin P1 is V(Cs)=V*(Cx/(Cs+Cx)). The voltage on P1 thus depends on the capacitance of the sense capacitor Cx provided by the sense electrode 4. In principle, this voltage may be measured to provide an indication of the capacitance of the sense capacitor. However, in practice the voltage V(Cs) provided by the single charging cycle in step 2 will be small (because Cx<<Cs). Thus to provide a more robust measure of capacitance Cx the senor 2 is operable to repeatedly execute steps 2 and 3 (i.e. without performing the reset step 1). In each repetition of steps 2 and 3 a discrete increment of charge is added to the sample capacitor. Thus the voltage V(Cs) after each iteration of steps 2 and 3 increases asymptotically in dependence on the magnitude of the sense capacitor Cx (the increase is asymptotic because less charge is added in subsequent iterations because of the charge already on the sample capacitor Cs).
After a number of these charge cycles (i.e. a burst of pulses), the voltage on pin P1 may be measured and taken as an indicator of Cx. However, this requires the measurement channel M of the microcontroller 6 which is associated with pin P1 to have the capability of measuring an analogue voltage. This requires relatively complex circuitry. Thus it is common not to burst for a fixed number of pulses, but to simply keep bursting (i.e. iterating steps 2 and 3) until the voltage V(Cs) reaches a measurement threshold Mthresh, e.g. where typically Mthresh=V/2. The number of charging cycles required for the voltage across the sample capacitor Cs to exceed the measurement threshold (as determined by a simple comparator) is an (inverse) measurement of the capacitance to ground of the sense electrode, and hence indicative of the proximity or otherwise of an object. The “variable burst length” scheme has the advantage over “fixed burst length” schemes of using a comparator instead of a more complex voltage measurement function. Nonetheless, both schemes are found to provide robust and reliable measurements of relatively small capacitances.
The sensor in FIG. 1 is a single channel sensor capable of measuring the capacitance of a single sense electrode. However, in many applications there is a desire to measure the capacitances of two or more sense electrodes, i.e. there is a desire to provide a multi-channel capacitive sensor. For example, the designer of a device employing a capacitive sensor user interface will typically wish to provide more than one touch sensitive button. Furthermore, in other applications it is common to provide a reference channel in parallel with a “real” sense channel. For example, in a fluid level application, a reference channel may be associated with a reference sense electrode located at the bottom of a container such that it is always adjacent fluid in the container. A sense electrode associated with the “real” sense channel may be placed midway up the container. The measured capacitance of the sense electrode associated with the “real” sense channel will depend on whether the fluid in the container is above or below the midway point (i.e. whether or not it is adjacent the sense electrode). However, the absolute measure capacitance values will in general vary widely depending on sensor tolerance, drifts, and properties of the fluid being sensed. Thus it may be difficult to determine based solely on an absolute measurement of capacitance whether or not the sense electrode of the “real” sense channel is adjacent fluid in the container. However, by providing the parallel reference channel, the capacitance determined by the “real” sense channel may be compared to that determined by the reference channel. If they are similar, it can be assumed the container is more than half full, if they are significantly different, it can be assumed the container is less than half full.
FIG. 3 schematically shows a known dual-channel capacitive sensor 12. The sensor 12 is for measuring first and second capacitances Cx1, Cx2 of first and second sense electrodes 14-1, 14-2 to a system reference potential (ground). The dual-channel sensor 12 of FIG. 3 provides two sense channels by simply duplicating the sense channel of FIG. 1. The sensor 12 requires four pins P1, P2, P3, P4 of a suitably programmed microcontroller 16, and two sample capacitors Cs1, Cs2. The sense channels associated with the respective sense electrodes 14-1, 14-2 are in effect completely independent of one another and each operates individually in the manner described above for the sensor shown in FIG. 1.
Sensors having still more channels can be provided by adding further replications of the single sensor channel shown in FIG. 1. However, the inventors have identified drawbacks of simply using n independent replications of the single sensor channel of FIG. 1 to provide an m-channel capacitive sensor. For example, with this approach each sensor channel requires two connections to the controller so a total of 2 m connections, e.g. microcontroller pins, are required for an m-channel sensor. Furthermore, the inventors have found the independent nature of the sense channels can lead to problems with inter-channel consistency. For example, different drifts between the different channels are common, e.g. because the channels have their own different sample capacitors, and these are typically relatively (and differently) sensitive to changing environmental conditions, such as temperature.
In some cases the differently varying channel responses associated with known multi-channel sensors will not be considered overly problematic. For example this might be the case where each channel is primarily for identifying temporal changes in its own signal, such as in a simple bi-state proximity sensor application. In these cases comparison with other channels is not needed and so the changing relative responses of different channels is not a concern. However, in some cases the relative signals from a pair of channels will be the primary parameter of interest. For example, where one channel is for providing a reference signal for comparison with another channel, such as might be the case in a fluid sensor application.
Accordingly there is a need for multi-channel capacitive sensors which provide for reduced relative drift between channels and which also require fewer connections with increasing numbers of channels than known multi-channel sensors.